package com.szl.group.common.enums;

/**
 * description:
 * author: shenxiaolong
 * date: 2020/6/20  16:54
 */
public enum ResultCodeEnum {

    OK(200, "请求成功"),
    FAILED(400, "请求异常"),
    ACCESS_DENIED(401, "您无权进行此操作"),
    FORBIDDEN(403, "您无权访问该资源"),
    NOT_FOUND(404, "找不到该页面"),
    INTERNAL_SERVER_ERROR(500, "服务器异常"),
    UNKNOWN_ERROR(501, "未知异常"),
    BAD_GATEWAY(502, "网关异常"),
    BAD_CREDENTIALS(1000, "用户名或密码不正确"),
    USERNAME_NOTFOUND(1001, "该账户不存在"),
    ACCOUNT_LOCKED(1002, "该账户被锁定"),
    NONCE_EXPIRED(1003, "该账户已失效"),
    ACCOUNT_DISABLED(1004, "该账户被禁用"),
    TOKEN_EXPIRED(1005, "token已过期"),
    METHOD_ARGUMENT_NOT_VALID(1006, "参数校验异常"),
    TOKEN_VALIDA_NULL(1007, "token为空"),
    TOKEN_VALIDA_ERROR(1008, "token验证错误"),
    TOKEN_VALIDA_FAIL(1009, "token验证失败"),
    FUNCTION_NO_HAVE(1010, "函数体不存在"),
    FREQUENTLY(1011, "请求过于频繁"),
    ;
    private int code;
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
